import { eMenuType } from '@/interface/enum';
import { RouteRecordRaw } from 'vue-router';
import { iRouteMeta } from '@/interface/iRouteInfo';
import { getMenuImageUrl } from '@/utils/ui';

const sys_meta: iRouteMeta = {
  menu_show: true,
  menu_type: eMenuType.MENU,
  normal: getMenuImageUrl('room.png'),
  hover: getMenuImageUrl('room_hover.png'),
  parentPath: '',
  sort: 1,
  title: '系统管理',
  elements: [
    // {
    //   key: 'online_pay_refund',
    //   title: '退款功能',
    //   local_path: RouterConfig.Main.fullPath,
    //   menu_type: eMenuType.ELEMENT,
    // },
  ],
};

export const sys_routes: RouteRecordRaw = {
  name: 'system',
  path: '/system',
  meta: sys_meta,
  redirect: '/system/team_manage',
  component: () => import('@/layout/ContentLayout.vue'),
  children: [
    {
      meta: {
        menu_show: true,
        menu_type: eMenuType.PAGE,
        parentPath: '/system',
        title: '组别管理',
      },
      path: '/system/team_manage',
      name: 'team_manage',
      component: () => import('@/views/sys/team_manage/index.vue'),
      // children: [
      //     {
      //         meta: <iRouteMeta>{
      //             menu_show: false,
      //             menu_type: eMenuType.PAGE,
      //             parentPath: "/system/sys_logs",
      //             title: "日志详情",
      //         },
      //         path: "/system/sys_logs/detail",
      //         name: "sys_log_detail",
      //         component: () => import("@/views/sys/account_info/index.vue")
      //     },
      // ]
    },
    {
      meta: <iRouteMeta>{
        menu_show: true,
        menu_type: eMenuType.PAGE,
        parentPath: '/system',
        title: '个人信息',
      },
      path: '/system/account',
      name: 'sys_account',
      component: () => import('@/views/sys/account_info/index.vue'),
    },
  ],
};
